package com.demo.utils;

import java.io.IOException;

import org.beetl.core.Configuration;
import org.beetl.core.GroupTemplate;
import org.beetl.core.resource.WebAppResourceLoader;

public class MyConstants {

	/**
	 * 参考: http://ibeetl.com/guide/#beetl
	 * WebAppResourceLoader
	 * 
	 */
	public static GroupTemplate WEBAPP_GT = webappGt();
	
	private static GroupTemplate webappGt(){
		GroupTemplate gt = null;
		WebAppResourceLoader loader = new WebAppResourceLoader();
		try {
			Configuration cfg = Configuration.defaultConfiguration();
			gt = new GroupTemplate(loader, cfg);
		} catch (IOException e) {
			e.printStackTrace();
		}
		return gt;
	}
	
}
